package com.infra.micro.id.domain.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;

@ApiModel(value = "IdSegmentPO", description = "id_segment表实体对象")
public class IdSegmentPO implements Serializable {
    /**
     * BIGINT(19) 必填
     * 自增主键
     */
    @ApiModelProperty(name = "segmentId", value = "自增主键")
    private Long segmentId;

    /**
     * INTEGER(10) 必填
     * 业务应用唯一标识ID
     */
    @ApiModelProperty(name = "appId", value = "业务应用唯一标识ID")
    private Integer appId;

    /**
     * BIGINT(19) 默认值[0] 必填
     * 开始id，仅记录初始值，无其他含义。初始化时start_id和max_id应相同
     */
    @ApiModelProperty(name = "startId", value = "开始id，仅记录初始值，无其他含义。初始化时start_id和max_id应相同")
    private Long startId;

    /**
     * BIGINT(19) 默认值[0] 必填
     * 当前最大id
     */
    @ApiModelProperty(name = "maxId", value = "当前最大id")
    private Long maxId;

    /**
     * INTEGER(10) 默认值[1000] 必填
     * 步长
     */
    @ApiModelProperty(name = "step", value = "步长")
    private Integer step;

    /**
     * TIMESTAMP(19) 默认值[CURRENT_TIMESTAMP] 必填
     * 创建时间
     */
    @ApiModelProperty(name = "createTime", value = "创建时间")
    private Date createTime;

    /**
     * TIMESTAMP(19) 默认值[CURRENT_TIMESTAMP] 必填
     * 更新时间
     */
    @ApiModelProperty(name = "updateTime", value = "更新时间")
    private Date updateTime;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table id_segment
     *
     * @mbg.generated
     */
    private static final long serialVersionUID = 1L;

    /**
     * BIGINT(19) 必填
     * 获得 自增主键
     */
    public Long getSegmentId() {
        return segmentId;
    }

    /**
     * BIGINT(19) 必填
     * 设置 自增主键
     */
    public void setSegmentId(Long segmentId) {
        this.segmentId = segmentId;
    }

    /**
     * INTEGER(10) 必填
     * 获得 业务应用唯一标识ID
     */
    public Integer getAppId() {
        return appId;
    }

    /**
     * INTEGER(10) 必填
     * 设置 业务应用唯一标识ID
     */
    public void setAppId(Integer appId) {
        this.appId = appId;
    }

    /**
     * BIGINT(19) 默认值[0] 必填
     * 获得 开始id，仅记录初始值，无其他含义。初始化时start_id和max_id应相同
     */
    public Long getStartId() {
        return startId;
    }

    /**
     * BIGINT(19) 默认值[0] 必填
     * 设置 开始id，仅记录初始值，无其他含义。初始化时start_id和max_id应相同
     */
    public void setStartId(Long startId) {
        this.startId = startId;
    }

    /**
     * BIGINT(19) 默认值[0] 必填
     * 获得 当前最大id
     */
    public Long getMaxId() {
        return maxId;
    }

    /**
     * BIGINT(19) 默认值[0] 必填
     * 设置 当前最大id
     */
    public void setMaxId(Long maxId) {
        this.maxId = maxId;
    }

    /**
     * INTEGER(10) 默认值[1000] 必填
     * 获得 步长
     */
    public Integer getStep() {
        return step;
    }

    /**
     * INTEGER(10) 默认值[1000] 必填
     * 设置 步长
     */
    public void setStep(Integer step) {
        this.step = step;
    }

    /**
     * TIMESTAMP(19) 默认值[CURRENT_TIMESTAMP] 必填
     * 获得 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * TIMESTAMP(19) 默认值[CURRENT_TIMESTAMP] 必填
     * 设置 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * TIMESTAMP(19) 默认值[CURRENT_TIMESTAMP] 必填
     * 获得 更新时间
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * TIMESTAMP(19) 默认值[CURRENT_TIMESTAMP] 必填
     * 设置 更新时间
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table id_segment
     *
     * @mbg.generated
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", segmentId=").append(segmentId);
        sb.append(", appId=").append(appId);
        sb.append(", startId=").append(startId);
        sb.append(", maxId=").append(maxId);
        sb.append(", step=").append(step);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table id_segment
     *
     * @mbg.generated
     */
    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        IdSegmentPO other = (IdSegmentPO) that;
        return (this.getSegmentId() == null ? other.getSegmentId() == null : this.getSegmentId().equals(other.getSegmentId()))
            && (this.getAppId() == null ? other.getAppId() == null : this.getAppId().equals(other.getAppId()))
            && (this.getStartId() == null ? other.getStartId() == null : this.getStartId().equals(other.getStartId()))
            && (this.getMaxId() == null ? other.getMaxId() == null : this.getMaxId().equals(other.getMaxId()))
            && (this.getStep() == null ? other.getStep() == null : this.getStep().equals(other.getStep()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table id_segment
     *
     * @mbg.generated
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSegmentId() == null) ? 0 : getSegmentId().hashCode());
        result = prime * result + ((getAppId() == null) ? 0 : getAppId().hashCode());
        result = prime * result + ((getStartId() == null) ? 0 : getStartId().hashCode());
        result = prime * result + ((getMaxId() == null) ? 0 : getMaxId().hashCode());
        result = prime * result + ((getStep() == null) ? 0 : getStep().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }
}